<%@page import="News.entity.Topic"%>
<%@page import="News.entity.Page"%>
<%@page import="News.Dao.TopicDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<title>新闻发布系统管理后台</title>
<link href="css/admin.css" rel="stylesheet" type="text/css" />
<div id="header">
  <div id="welcome">欢迎使用主题管理系统！</div>
  <div id="nav">
    <div id="logo"><img src="images/logo.jpg" alt="新闻中国" /></div>
    <div id="a_b01"><img src="images/a_b01.gif" alt="" /></div>
  </div>
</div>
<jsp:include page="checkdologin.jsp"></jsp:include>
<div id="admin_bar">
  <div id="status">管理员： <%=session.getAttribute("uname") %>>登录  &#160;&#160;&#160;&#160; <a href="dologout.jsp">login out</a></div>
  <div id="channel"> </div>
</div>
    <script language="javascript">
	function clickdel(){
		return confirm("删除请点击确认");
	}
	
</script>

</head>
<body>

<div id="main">
  <div id="opt_list">
  <ul>
    <li><a href="Addnews.jsp?opr=findTopics">添加新闻</a></li>
    <li><a href="Admin.jsp?opr=list">编辑新闻</a></li>
    <li><a href="AddTopic.jsp">添加主题</a></li>
    <li><a href="Updatetopic.jsp?opr=list">编辑主题</a></li>
  </ul>
</div>

  <div id="opt_area">
    <h1 id="opt_type"> 修改标题</h1>
    
     <%
      	    int pageNo=1;
      	    try{
      	      pageNo=Integer.parseInt(request.getParameter("pageNo"));
      	    }catch (Exception e){
      	    
      	    }
      	    
      	    try{
      	    	
      	    }catch(Exception e){
      	    }
      	    
	   		TopicDao topicdao= new TopicDao();
      		Page<Topic> pagetopic = topicdao.Fenye(pageNo);
      		List<Topic>	listtopic=pagetopic.getDatas();
      		for(int i=1;i<=listtopic.size();i++){  %>
      		
      		<%-- <li> <a style="text-decoration: none;" href="TopicBianji.jsp?opr=readNew&amp;nid=<%=listtopic.get(i-1).getTid()%>"> 主题名称：<%=listtopic.get(i-1).getTname()%>&nbsp;修改  </a></li> --%>
			 <li><span>  <%=listtopic.get(i-1).getTname() %> <a href='TopicBianji.jsp?opr=UpdateTopic&nid=<%=listtopic.get(i-1).getTid() %>'>修改</a> &#160;&#160;&#160;&#160; <a href='Control?opr=deleteTopic&nid=<%=listtopic.get(i-1).getTid()%>' onclick='return clickdel()'>删除</a> </span> </li>
   
      		<%} %>
      		
 	
      	
	      <a href="Updatetopic.jsp?pageNo=1">首页</a>
	      <% if(pageNo>1){ %>
	       <a href="Updatetopic.jsp?pageNo=<%=pageNo-1 %>">上一页</a>
	            	        <%} %> 
	            	          <%if(pageNo<pagetopic.getTotalPages()){ %>
	       <a href="Updatetopic.jsp?pageNo=<%=pageNo+1 %>">下一页</a>
	            	        <%} %> 
	        <a href="Updatetopic.jsp?pageNo=<%=pagetopic.getTotalPages()%>">尾页</a>  
	        <p> <a href="Admin.jsp">返回</a>  </p>
 
  </div>
</div>
<div id="footer">
  <div id="site_link"> <a href="#">关于我们</a><span>|</span> <a href="#">Aboue Us</a><span>|</span> <a href="#">联系我们</a><span>|</span> <a href="#">广告服务</a><span>|</span> <a href="#">供稿服务</a><span>|</span> <a href="#">法律声明</a><span>|</span> <a href="#">招聘信息</a><span>|</span> <a href="#">网站地图</a><span>|</span> <a href="#">留言反馈</a> </div>
<div id="footer">
  <p class="">24小时客户服务热线：010-68988888  &#160;&#160;&#160;&#160; <a href="#">常见问题解答</a> &#160;&#160;&#160;&#160;  新闻热线：010-627488888<br />
    文明办网文明上网举报电话：010-627488888  &#160;&#160;&#160;&#160;  举报邮箱：<a href="#">jubao@jb-aptech.com.cn</a></p>
  <p class="copyright">Copyright &copy; 1999-2009 News China gov, All Right Reserver<br />
    新闻中国   版权所有</p>
</div>
</body>
</html>
